<!DOCTYPE html>
<html lang=en>
<head>
    <!-- so meta -->
    <meta charset="utf-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="HandheldFriendly" content="True">
    <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1" />
    <meta name="description" content="lombok可以使用注解来简化java的开发，虽然idea有快捷键Alt+insert组合键可以添加构造函数，get&#x2F;set&#x2F;toString等方法，但是这样代码量会显得冗长且缺乏技术含量，使用lombok就可以解决这个问题首先添加pom.xml依赖 123456&amp;lt;dependency&amp;gt;    &amp;lt;groupId&amp;gt;org.projectlombok&amp;lt;&#x2F;groupId&amp;g">
<meta name="keywords" content="Java">
<meta property="og:type" content="article">
<meta property="og:title" content="使用lombok注解简化代码开发">
<meta property="og:url" content="http:&#x2F;&#x2F;yoursite.com&#x2F;2019&#x2F;11&#x2F;04&#x2F;%E4%BD%BF%E7%94%A8lombok%E6%B3%A8%E8%A7%A3%E7%AE%80%E5%8C%96%E4%BB%A3%E7%A0%81%E5%BC%80%E5%8F%91&#x2F;index.html">
<meta property="og:site_name" content="ECIN&#39;S BLOG">
<meta property="og:description" content="lombok可以使用注解来简化java的开发，虽然idea有快捷键Alt+insert组合键可以添加构造函数，get&#x2F;set&#x2F;toString等方法，但是这样代码量会显得冗长且缺乏技术含量，使用lombok就可以解决这个问题首先添加pom.xml依赖 123456&amp;lt;dependency&amp;gt;    &amp;lt;groupId&amp;gt;org.projectlombok&amp;lt;&#x2F;groupId&amp;g">
<meta property="og:locale" content="en">
<meta property="og:image" content="http:&#x2F;&#x2F;148.70.50.70&#x2F;source&#x2F;1572833796181.jpg">
<meta property="og:updated_time" content="2019-11-04T03:49:04.000Z">
<meta name="twitter:card" content="summary">
<meta name="twitter:image" content="http:&#x2F;&#x2F;148.70.50.70&#x2F;source&#x2F;1572833796181.jpg">
    
    
        
          
              <link rel="shortcut icon" href="/images/favicon.ico">
          
        
        
          
            <link rel="icon" type="image/png" href="/images/favicon-192x192.png" sizes="192x192">
          
        
        
          
            <link rel="apple-touch-icon" sizes="180x180" href="/images/apple-touch-icon.png">
          
        
    
    <!-- title -->
    <title>使用lombok注解简化代码开发</title>
    <!-- styles -->
    <link rel="stylesheet" href="/css/style.css">
    <!-- persian styles -->
    
      <link rel="stylesheet" href="/css/rtl.css">
    
    <!-- rss -->
    
    
</head>

<body class="max-width mx-auto px3 ltr">
    
      <div id="header-post">
  <a id="menu-icon" href="#"><i class="fas fa-bars fa-lg"></i></a>
  <a id="menu-icon-tablet" href="#"><i class="fas fa-bars fa-lg"></i></a>
  <a id="top-icon-tablet" href="#" onclick="$('html, body').animate({ scrollTop: 0 }, 'fast');" style="display:none;"><i class="fas fa-chevron-up fa-lg"></i></a>
  <span id="menu">
    <span id="nav">
      <ul>
         
          <li><a href="/">Home</a></li>
         
          <li><a href="/about/">About</a></li>
         
          <li><a href="/archives/">Writing</a></li>
         
          <li><a href="/projects_url">Projects</a></li>
        
      </ul>
    </span>
    <br/>
    <span id="actions">
      <ul>
        
        <li><a class="icon" href="/2019/11/06/SpringBoot%E5%BC%82%E5%B8%B8%E5%A4%84%E7%90%86/"><i class="fas fa-chevron-left" aria-hidden="true" onmouseover="$('#i-prev').toggle();" onmouseout="$('#i-prev').toggle();"></i></a></li>
        
        
        <li><a class="icon" href="/2019/10/31/V%E7%AC%94%E8%AE%B0/"><i class="fas fa-chevron-right" aria-hidden="true" onmouseover="$('#i-next').toggle();" onmouseout="$('#i-next').toggle();"></i></a></li>
        
        <li><a class="icon" href="#" onclick="$('html, body').animate({ scrollTop: 0 }, 'fast');"><i class="fas fa-chevron-up" aria-hidden="true" onmouseover="$('#i-top').toggle();" onmouseout="$('#i-top').toggle();"></i></a></li>
        <li><a class="icon" href="#"><i class="fas fa-share-alt" aria-hidden="true" onmouseover="$('#i-share').toggle();" onmouseout="$('#i-share').toggle();" onclick="$('#share').toggle();return false;"></i></a></li>
      </ul>
      <span id="i-prev" class="info" style="display:none;">Previous post</span>
      <span id="i-next" class="info" style="display:none;">Next post</span>
      <span id="i-top" class="info" style="display:none;">Back to top</span>
      <span id="i-share" class="info" style="display:none;">Share post</span>
    </span>
    <br/>
    <div id="share" style="display: none">
      <ul>
  <li><a class="icon" href="http://www.facebook.com/sharer.php?u=http://yoursite.com/2019/11/04/%E4%BD%BF%E7%94%A8lombok%E6%B3%A8%E8%A7%A3%E7%AE%80%E5%8C%96%E4%BB%A3%E7%A0%81%E5%BC%80%E5%8F%91/" target="_blank" rel="noopener"><i class="fab fa-facebook " aria-hidden="true"></i></a></li>
  <li><a class="icon" href="https://twitter.com/share?url=http://yoursite.com/2019/11/04/%E4%BD%BF%E7%94%A8lombok%E6%B3%A8%E8%A7%A3%E7%AE%80%E5%8C%96%E4%BB%A3%E7%A0%81%E5%BC%80%E5%8F%91/&text=使用lombok注解简化代码开发" target="_blank" rel="noopener"><i class="fab fa-twitter " aria-hidden="true"></i></a></li>
  <li><a class="icon" href="http://www.linkedin.com/shareArticle?url=http://yoursite.com/2019/11/04/%E4%BD%BF%E7%94%A8lombok%E6%B3%A8%E8%A7%A3%E7%AE%80%E5%8C%96%E4%BB%A3%E7%A0%81%E5%BC%80%E5%8F%91/&title=使用lombok注解简化代码开发" target="_blank" rel="noopener"><i class="fab fa-linkedin " aria-hidden="true"></i></a></li>
  <li><a class="icon" href="https://pinterest.com/pin/create/bookmarklet/?url=http://yoursite.com/2019/11/04/%E4%BD%BF%E7%94%A8lombok%E6%B3%A8%E8%A7%A3%E7%AE%80%E5%8C%96%E4%BB%A3%E7%A0%81%E5%BC%80%E5%8F%91/&is_video=false&description=使用lombok注解简化代码开发" target="_blank" rel="noopener"><i class="fab fa-pinterest " aria-hidden="true"></i></a></li>
  <li><a class="icon" href="mailto:?subject=使用lombok注解简化代码开发&body=Check out this article: http://yoursite.com/2019/11/04/%E4%BD%BF%E7%94%A8lombok%E6%B3%A8%E8%A7%A3%E7%AE%80%E5%8C%96%E4%BB%A3%E7%A0%81%E5%BC%80%E5%8F%91/" target="_blank" rel="noopener"><i class="fas fa-envelope " aria-hidden="true"></i></a></li>
  <li><a class="icon" href="https://getpocket.com/save?url=http://yoursite.com/2019/11/04/%E4%BD%BF%E7%94%A8lombok%E6%B3%A8%E8%A7%A3%E7%AE%80%E5%8C%96%E4%BB%A3%E7%A0%81%E5%BC%80%E5%8F%91/&title=使用lombok注解简化代码开发" target="_blank" rel="noopener"><i class="fab fa-get-pocket " aria-hidden="true"></i></a></li>
  <li><a class="icon" href="http://reddit.com/submit?url=http://yoursite.com/2019/11/04/%E4%BD%BF%E7%94%A8lombok%E6%B3%A8%E8%A7%A3%E7%AE%80%E5%8C%96%E4%BB%A3%E7%A0%81%E5%BC%80%E5%8F%91/&title=使用lombok注解简化代码开发" target="_blank" rel="noopener"><i class="fab fa-reddit " aria-hidden="true"></i></a></li>
  <li><a class="icon" href="http://www.stumbleupon.com/submit?url=http://yoursite.com/2019/11/04/%E4%BD%BF%E7%94%A8lombok%E6%B3%A8%E8%A7%A3%E7%AE%80%E5%8C%96%E4%BB%A3%E7%A0%81%E5%BC%80%E5%8F%91/&title=使用lombok注解简化代码开发" target="_blank" rel="noopener"><i class="fab fa-stumbleupon " aria-hidden="true"></i></a></li>
  <li><a class="icon" href="http://digg.com/submit?url=http://yoursite.com/2019/11/04/%E4%BD%BF%E7%94%A8lombok%E6%B3%A8%E8%A7%A3%E7%AE%80%E5%8C%96%E4%BB%A3%E7%A0%81%E5%BC%80%E5%8F%91/&title=使用lombok注解简化代码开发" target="_blank" rel="noopener"><i class="fab fa-digg " aria-hidden="true"></i></a></li>
  <li><a class="icon" href="http://www.tumblr.com/share/link?url=http://yoursite.com/2019/11/04/%E4%BD%BF%E7%94%A8lombok%E6%B3%A8%E8%A7%A3%E7%AE%80%E5%8C%96%E4%BB%A3%E7%A0%81%E5%BC%80%E5%8F%91/&name=使用lombok注解简化代码开发&description=" target="_blank" rel="noopener"><i class="fab fa-tumblr " aria-hidden="true"></i></a></li>
  <li><a class="icon" href="https://news.ycombinator.com/submitlink?u=http://yoursite.com/2019/11/04/%E4%BD%BF%E7%94%A8lombok%E6%B3%A8%E8%A7%A3%E7%AE%80%E5%8C%96%E4%BB%A3%E7%A0%81%E5%BC%80%E5%8F%91/&t=使用lombok注解简化代码开发" target="_blank" rel="noopener"><i class="fab fa-hacker-news " aria-hidden="true"></i></a></li>
</ul>

    </div>
    <div id="toc">
      <ol class="toc"><li class="toc-item toc-level-4"><a class="toc-link" href="#lombok可以使用注解来简化java的开发，虽然idea有快捷键Alt-insert组合键可以添加构造函数，get-set-toString等方法，但是这样代码量会显得冗长且缺乏技术含量，使用lombok就可以解决这个问题"><span class="toc-number">1.</span> <span class="toc-text">lombok可以使用注解来简化java的开发，虽然idea有快捷键Alt+insert组合键可以添加构造函数，get/set/toString等方法，但是这样代码量会显得冗长且缺乏技术含量，使用lombok就可以解决这个问题</span></a></li><li class="toc-item toc-level-4"><a class="toc-link" href="#Data"><span class="toc-number">2.</span> <span class="toc-text">@Data</span></a></li><li class="toc-item toc-level-4"><a class="toc-link" href="#Getter-Setter"><span class="toc-number">3.</span> <span class="toc-text">@Getter @Setter</span></a></li><li class="toc-item toc-level-4"><a class="toc-link" href="#Cleanup"><span class="toc-number">4.</span> <span class="toc-text">@Cleanup</span></a></li></ol></li><li class="toc-item toc-level-3"><a class="toc-link" href="#使用idea插件解决对象无法使用-Data注解的类方法问题"><span class="toc-number"></span> <span class="toc-text">使用idea插件解决对象无法使用@Data注解的类方法问题</span></a>
    </div>
  </span>
</div>

    
    <div class="content index py4">
        
        <article class="post" itemscope itemtype="http://schema.org/BlogPosting">
  <header>
    
    <h1 class="posttitle" itemprop="name headline">
        使用lombok注解简化代码开发
    </h1>



    <div class="meta">
      <span class="author" itemprop="author" itemscope itemtype="http://schema.org/Person">
        <span itemprop="name">ECIN'S BLOG</span>
      </span>
      
    <div class="postdate">
      
        <time datetime="2019-11-04T03:28:47.000Z" itemprop="datePublished">2019-11-04</time>
        
      
    </div>


      

      
    <div class="article-tag">
        <i class="fas fa-tag"></i>
        <a class="tag-link" href="/tags/Java/" rel="tag">Java</a>
    </div>


    </div>
  </header>
  

  <div class="content" itemprop="articleBody">
    <h4 id="lombok可以使用注解来简化java的开发，虽然idea有快捷键Alt-insert组合键可以添加构造函数，get-set-toString等方法，但是这样代码量会显得冗长且缺乏技术含量，使用lombok就可以解决这个问题"><a href="#lombok可以使用注解来简化java的开发，虽然idea有快捷键Alt-insert组合键可以添加构造函数，get-set-toString等方法，但是这样代码量会显得冗长且缺乏技术含量，使用lombok就可以解决这个问题" class="headerlink" title="lombok可以使用注解来简化java的开发，虽然idea有快捷键Alt+insert组合键可以添加构造函数，get/set/toString等方法，但是这样代码量会显得冗长且缺乏技术含量，使用lombok就可以解决这个问题"></a>lombok可以使用注解来简化java的开发，虽然idea有快捷键Alt+insert组合键可以添加构造函数，get/set/toString等方法，但是这样代码量会显得冗长且缺乏技术含量，使用lombok就可以解决这个问题</h4><p>首先添加pom.xml依赖</p>
<figure class="highlight xml"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br></pre></td><td class="code"><pre><span class="line"><span class="tag">&lt;<span class="name">dependency</span>&gt;</span></span><br><span class="line">    <span class="tag">&lt;<span class="name">groupId</span>&gt;</span>org.projectlombok<span class="tag">&lt;/<span class="name">groupId</span>&gt;</span></span><br><span class="line">    <span class="tag">&lt;<span class="name">artifactId</span>&gt;</span>lombok<span class="tag">&lt;/<span class="name">artifactId</span>&gt;</span></span><br><span class="line">    <span class="tag">&lt;<span class="name">version</span>&gt;</span>1.16.20<span class="tag">&lt;/<span class="name">version</span>&gt;</span></span><br><span class="line">    <span class="tag">&lt;<span class="name">scope</span>&gt;</span>provided<span class="tag">&lt;/<span class="name">scope</span>&gt;</span></span><br><span class="line"><span class="tag">&lt;/<span class="name">dependency</span>&gt;</span></span><br></pre></td></tr></table></figure>
<p>然后就可以使用了</p>
<h4 id="Data"><a href="#Data" class="headerlink" title="@Data"></a>@Data</h4><figure class="highlight java"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br></pre></td><td class="code"><pre><span class="line"><span class="meta">@Data</span></span><br><span class="line"><span class="keyword">public</span> <span class="class"><span class="keyword">class</span> <span class="title">User</span> <span class="keyword">implements</span> <span class="title">Serializable</span> </span>&#123;</span><br><span class="line"></span><br><span class="line">    <span class="keyword">private</span> Integer id;</span><br><span class="line">    <span class="keyword">private</span> String username;</span><br><span class="line">    <span class="keyword">private</span> String password;</span><br><span class="line">&#125;</span><br></pre></td></tr></table></figure>
<p>这个@Data拥有开头所说的get/set等方法，或者</p>
<h4 id="Getter-Setter"><a href="#Getter-Setter" class="headerlink" title="@Getter @Setter"></a>@Getter @Setter</h4><figure class="highlight java"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br></pre></td><td class="code"><pre><span class="line"><span class="keyword">public</span> <span class="class"><span class="keyword">class</span> <span class="title">User</span> <span class="keyword">implements</span> <span class="title">Serializable</span> </span>&#123;</span><br><span class="line"></span><br><span class="line">    <span class="meta">@Getter</span> <span class="meta">@Setter</span> <span class="keyword">private</span> Integer id;</span><br><span class="line">    <span class="meta">@Getter</span> <span class="meta">@Setter</span> <span class="keyword">private</span> String username;</span><br><span class="line">    <span class="meta">@Getter</span> <span class="meta">@Setter</span> <span class="keyword">private</span> String password;</span><br><span class="line">&#125;</span><br></pre></td></tr></table></figure>
<h4 id="Cleanup"><a href="#Cleanup" class="headerlink" title="@Cleanup"></a>@Cleanup</h4><p>此注解将会自动电泳close()方法，简化代码且避免忘记关闭一些io</p>
<figure class="highlight java"><table><tr><td class="gutter"><pre><span class="line">1</span><br></pre></td><td class="code"><pre><span class="line"><span class="meta">@Cleanup</span> InputStream in = <span class="keyword">new</span> FileInputStream(file);</span><br></pre></td></tr></table></figure>
<p>一般用到的就这几个，还有一些不太常用。</p>
<h3 id="使用idea插件解决对象无法使用-Data注解的类方法问题"><a href="#使用idea插件解决对象无法使用-Data注解的类方法问题" class="headerlink" title="使用idea插件解决对象无法使用@Data注解的类方法问题"></a>使用idea插件解决对象无法使用@Data注解的类方法问题</h3><p>虽然@Data方便，但是在开发中，如果要调用.setName()方法时，会发现无法调用，这是因为在源码级别没有set方法，lombok使用注解是编译成class文件时会把get/set方法加入的，因此需要安装idea插件。<br><img src="http://148.70.50.70/source/1572833796181.jpg" alt="image.png"><br>完毕</p>

  </div>
</article>



        
          <div id="footer-post-container">
  <div id="footer-post">

    <div id="nav-footer" style="display: none">
      <ul>
         
          <li><a href="/">Home</a></li>
         
          <li><a href="/about/">About</a></li>
         
          <li><a href="/archives/">Writing</a></li>
         
          <li><a href="/projects_url">Projects</a></li>
        
      </ul>
    </div>

    <div id="toc-footer" style="display: none">
      <ol class="toc"><li class="toc-item toc-level-4"><a class="toc-link" href="#lombok可以使用注解来简化java的开发，虽然idea有快捷键Alt-insert组合键可以添加构造函数，get-set-toString等方法，但是这样代码量会显得冗长且缺乏技术含量，使用lombok就可以解决这个问题"><span class="toc-number">1.</span> <span class="toc-text">lombok可以使用注解来简化java的开发，虽然idea有快捷键Alt+insert组合键可以添加构造函数，get/set/toString等方法，但是这样代码量会显得冗长且缺乏技术含量，使用lombok就可以解决这个问题</span></a></li><li class="toc-item toc-level-4"><a class="toc-link" href="#Data"><span class="toc-number">2.</span> <span class="toc-text">@Data</span></a></li><li class="toc-item toc-level-4"><a class="toc-link" href="#Getter-Setter"><span class="toc-number">3.</span> <span class="toc-text">@Getter @Setter</span></a></li><li class="toc-item toc-level-4"><a class="toc-link" href="#Cleanup"><span class="toc-number">4.</span> <span class="toc-text">@Cleanup</span></a></li></ol></li><li class="toc-item toc-level-3"><a class="toc-link" href="#使用idea插件解决对象无法使用-Data注解的类方法问题"><span class="toc-number"></span> <span class="toc-text">使用idea插件解决对象无法使用@Data注解的类方法问题</span></a>
    </div>

    <div id="share-footer" style="display: none">
      <ul>
  <li><a class="icon" href="http://www.facebook.com/sharer.php?u=http://yoursite.com/2019/11/04/%E4%BD%BF%E7%94%A8lombok%E6%B3%A8%E8%A7%A3%E7%AE%80%E5%8C%96%E4%BB%A3%E7%A0%81%E5%BC%80%E5%8F%91/" target="_blank" rel="noopener"><i class="fab fa-facebook fa-lg" aria-hidden="true"></i></a></li>
  <li><a class="icon" href="https://twitter.com/share?url=http://yoursite.com/2019/11/04/%E4%BD%BF%E7%94%A8lombok%E6%B3%A8%E8%A7%A3%E7%AE%80%E5%8C%96%E4%BB%A3%E7%A0%81%E5%BC%80%E5%8F%91/&text=使用lombok注解简化代码开发" target="_blank" rel="noopener"><i class="fab fa-twitter fa-lg" aria-hidden="true"></i></a></li>
  <li><a class="icon" href="http://www.linkedin.com/shareArticle?url=http://yoursite.com/2019/11/04/%E4%BD%BF%E7%94%A8lombok%E6%B3%A8%E8%A7%A3%E7%AE%80%E5%8C%96%E4%BB%A3%E7%A0%81%E5%BC%80%E5%8F%91/&title=使用lombok注解简化代码开发" target="_blank" rel="noopener"><i class="fab fa-linkedin fa-lg" aria-hidden="true"></i></a></li>
  <li><a class="icon" href="https://pinterest.com/pin/create/bookmarklet/?url=http://yoursite.com/2019/11/04/%E4%BD%BF%E7%94%A8lombok%E6%B3%A8%E8%A7%A3%E7%AE%80%E5%8C%96%E4%BB%A3%E7%A0%81%E5%BC%80%E5%8F%91/&is_video=false&description=使用lombok注解简化代码开发" target="_blank" rel="noopener"><i class="fab fa-pinterest fa-lg" aria-hidden="true"></i></a></li>
  <li><a class="icon" href="mailto:?subject=使用lombok注解简化代码开发&body=Check out this article: http://yoursite.com/2019/11/04/%E4%BD%BF%E7%94%A8lombok%E6%B3%A8%E8%A7%A3%E7%AE%80%E5%8C%96%E4%BB%A3%E7%A0%81%E5%BC%80%E5%8F%91/" target="_blank" rel="noopener"><i class="fas fa-envelope fa-lg" aria-hidden="true"></i></a></li>
  <li><a class="icon" href="https://getpocket.com/save?url=http://yoursite.com/2019/11/04/%E4%BD%BF%E7%94%A8lombok%E6%B3%A8%E8%A7%A3%E7%AE%80%E5%8C%96%E4%BB%A3%E7%A0%81%E5%BC%80%E5%8F%91/&title=使用lombok注解简化代码开发" target="_blank" rel="noopener"><i class="fab fa-get-pocket fa-lg" aria-hidden="true"></i></a></li>
  <li><a class="icon" href="http://reddit.com/submit?url=http://yoursite.com/2019/11/04/%E4%BD%BF%E7%94%A8lombok%E6%B3%A8%E8%A7%A3%E7%AE%80%E5%8C%96%E4%BB%A3%E7%A0%81%E5%BC%80%E5%8F%91/&title=使用lombok注解简化代码开发" target="_blank" rel="noopener"><i class="fab fa-reddit fa-lg" aria-hidden="true"></i></a></li>
  <li><a class="icon" href="http://www.stumbleupon.com/submit?url=http://yoursite.com/2019/11/04/%E4%BD%BF%E7%94%A8lombok%E6%B3%A8%E8%A7%A3%E7%AE%80%E5%8C%96%E4%BB%A3%E7%A0%81%E5%BC%80%E5%8F%91/&title=使用lombok注解简化代码开发" target="_blank" rel="noopener"><i class="fab fa-stumbleupon fa-lg" aria-hidden="true"></i></a></li>
  <li><a class="icon" href="http://digg.com/submit?url=http://yoursite.com/2019/11/04/%E4%BD%BF%E7%94%A8lombok%E6%B3%A8%E8%A7%A3%E7%AE%80%E5%8C%96%E4%BB%A3%E7%A0%81%E5%BC%80%E5%8F%91/&title=使用lombok注解简化代码开发" target="_blank" rel="noopener"><i class="fab fa-digg fa-lg" aria-hidden="true"></i></a></li>
  <li><a class="icon" href="http://www.tumblr.com/share/link?url=http://yoursite.com/2019/11/04/%E4%BD%BF%E7%94%A8lombok%E6%B3%A8%E8%A7%A3%E7%AE%80%E5%8C%96%E4%BB%A3%E7%A0%81%E5%BC%80%E5%8F%91/&name=使用lombok注解简化代码开发&description=" target="_blank" rel="noopener"><i class="fab fa-tumblr fa-lg" aria-hidden="true"></i></a></li>
  <li><a class="icon" href="https://news.ycombinator.com/submitlink?u=http://yoursite.com/2019/11/04/%E4%BD%BF%E7%94%A8lombok%E6%B3%A8%E8%A7%A3%E7%AE%80%E5%8C%96%E4%BB%A3%E7%A0%81%E5%BC%80%E5%8F%91/&t=使用lombok注解简化代码开发" target="_blank" rel="noopener"><i class="fab fa-hacker-news fa-lg" aria-hidden="true"></i></a></li>
</ul>

    </div>

    <div id="actions-footer">
        <a id="menu" class="icon" href="#" onclick="$('#nav-footer').toggle();return false;"><i class="fas fa-bars fa-lg" aria-hidden="true"></i> Menu</a>
        <a id="toc" class="icon" href="#" onclick="$('#toc-footer').toggle();return false;"><i class="fas fa-list fa-lg" aria-hidden="true"></i> TOC</a>
        <a id="share" class="icon" href="#" onclick="$('#share-footer').toggle();return false;"><i class="fas fa-share-alt fa-lg" aria-hidden="true"></i> Share</a>
        <a id="top" style="display:none" class="icon" href="#" onclick="$('html, body').animate({ scrollTop: 0 }, 'fast');"><i class="fas fa-chevron-up fa-lg" aria-hidden="true"></i> Top</a>
    </div>

  </div>
</div>

        
        <footer id="footer">
  <div class="footer-left">
    Copyright &copy; 2020 ECIN520
  </div>
  <div class="footer-right">
    <nav>
      <ul>
         
          <li><a href="/">Home</a></li>
         
          <li><a href="/about/">About</a></li>
         
          <li><a href="/archives/">Writing</a></li>
         
          <li><a href="/projects_url">Projects</a></li>
        
      </ul>
    </nav>
  </div>
</footer>

    </div>
    <!-- styles -->
<link rel="stylesheet" href="/lib/font-awesome/css/all.min.css">
<link rel="stylesheet" href="/lib/justified-gallery/css/justifiedGallery.min.css">

    <!-- jquery -->
<script src="/lib/jquery/jquery.min.js"></script>
<script src="/lib/justified-gallery/js/jquery.justifiedGallery.min.js"></script>
<!-- clipboard -->

  <script src="/lib/clipboard/clipboard.min.js"></script>
  <script type="text/javascript">
  $(function() {
    // copy-btn HTML
    var btn = "<span class=\"btn-copy tooltipped tooltipped-sw\" aria-label=\"Copy to clipboard!\">";
    btn += '<i class="far fa-clone"></i>';
    btn += '</span>'; 
    // mount it!
    $(".highlight table").before(btn);
    var clip = new ClipboardJS('.btn-copy', {
      text: function(trigger) {
        return Array.from(trigger.nextElementSibling.querySelectorAll('.code')).reduce((str,it)=>str+it.innerText+'\n','')
      }
    });
    clip.on('success', function(e) {
      e.trigger.setAttribute('aria-label', "Copied!");
      e.clearSelection();
    })
  })
  </script>

<script src="/js/main.js"></script>
<!-- search -->

<!-- Google Analytics -->

<!-- Baidu Analytics -->

<!-- Disqus Comments -->


</body>
</html>
